package thread;

/**
 * @author : gscsd
 * @description: 1.
 * @date : 2025/9/27 14:14
 */
public class ImplRunableCreateThread {

    public static void main(String[] args) {
        MyRunnable myRunnable = new MyRunnable();
        Thread thread = new Thread(myRunnable);
        thread.setName("runnable");
        thread.start();
        System.out.println(Thread.currentThread().getName() + ">>>>" + "线程启动了");
    }
}

class MyRunnable implements Runnable {
    @Override
    public void run() {
        System.out.println(Thread.currentThread().getName() + ">>>>" + "线程启动了");
    }
}